/*
 * Copyright (c) 2019.11，华乘电气科技有限公司
 * All rights reserved.
 *
 * 文件名称：aespectrumprivate.h
 * 
 * 初始版本：1.0
 * 作者：洪澄
 * 创建日期：2019/11/08
 * 摘要：ae图谱数据私有定义
 * 当前版本：1.0
 */

#pragma once

#include <QString>
#include <vector>

namespace DataSpecificationGW
{
    struct AEAmpExtInformationPrivate
    {
        friend class AEAmpSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucAESensorType;
        qint32 iDataPoint;
        float fSystemFrequency;
        std::vector<quint8 > vecPDTypeProbability;
        quint8 ucFrequencyBand;
        float fFrequencyLowerLimit;
        float fFequencyUpperLimit;
        QString qstrBGFileName;
        float fTriggerThreshold;
        qint16 sOpenTime;
        qint16 sShutTime;
        qint16 sMaxIntervalTime;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipAESensorType() { bSkipAESensorType = true; }
        void skipDataPoint() { bSkipDataPoint = true; }
        void skipSystemFrequency() { bSkipSystemFrequency = true; }
        void skipPDTypeProbability() { bSkipPDTypeProbability = true; }
        void skipFrequencyBand() { bSkipFrequencyBand = true; }
        void skipFrequencyLowerLimit() { bSkipFrequencyLowerLimit = true; }
        void skipFequencyUpperLimit() { bSkipFequencyUpperLimit = true; }
        void skipBGFileName() { bSkipBGFileName = true; }
        void skipTriggerThreshold() { bSkipTriggerThreshold = true; }
        void skipOpenTime() { bSkipOpenTime = true; }
        void skipShutTime() { bSkipShutTime = true; }
        void skipMaxIntervalTime() { bSkipMaxIntervalTime = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasAESensorType() const { return bHasAESensorType; }
        bool hasDataPoint() const { return bHasDataPoint; }
        bool hasSystemFrequency() const { return bHasSystemFrequency; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasFrequencyBand() const { return bHasFrequencyBand; }
        bool hasFrequencyLowerLimit() const { return bHasFrequencyLowerLimit; }
        bool hasFequencyUpperLimit() const { return bHasFequencyUpperLimit; }
        bool hasBGFileName() const { return bHasBGFileName; }
        bool hasTriggerThreshold() const { return bHasTriggerThreshold; }
        bool hasOpenTime() const { return bHasOpenTime; }
        bool hasShutTime() const { return bHasShutTime; }
        bool hasMaxIntervalTime() const { return bHasMaxIntervalTime; }
        bool hasGain() const { return bHasGain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }

        AEAmpExtInformationPrivate();
        void reset();

        AEAmpExtInformationPrivate& operator=(const AEAmpExtInformationPrivate& stAEAmpExtInformationPrivate);
        bool operator==(const AEAmpExtInformationPrivate& stAEAmpExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;//下限频率
        bool bSkipAmpUpperLimit;//上限频率
        bool bSkipAESensorType;//
        bool bSkipDataPoint;
        bool bSkipSystemFrequency;
        bool bSkipPDTypeProbability;
        bool bSkipFrequencyBand;
        bool bSkipFrequencyLowerLimit;
        bool bSkipFequencyUpperLimit;
        bool bSkipBGFileName;
        bool bSkipTriggerThreshold;
        bool bSkipOpenTime;
        bool bSkipShutTime;
        bool bSkipMaxIntervalTime;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasAESensorType;
        bool bHasDataPoint;
        bool bHasSystemFrequency;
        bool bHasPDTypeProbability;
        bool bHasFrequencyBand;
        bool bHasFrequencyLowerLimit;
        bool bHasFequencyUpperLimit;
        bool bHasBGFileName;
        bool bHasTriggerThreshold;
        bool bHasOpenTime;
        bool bHasShutTime;
        bool bHasMaxIntervalTime;
        bool bHasGain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
    };

    struct AEAmpDataPrivate
    {
        friend class AEAmpSpectrum;

        float fSignalMax;
        float fSignalRMS;
        float fFrequencyComponent1;
        float fFrequencyComponent2;
        float fBGSignalMax;
        float fBGSignalRMS;
        float fBGFrequencyComponent1;
        float fBGFrequencyComponent2;

        void skipSignalMax() { bSignalMax = true; }
        void skipSignalRMS() { bSkipSignalRMS = true; }
        void skipFrequencyComponent1() { bSkipFrequencyComponent1 = true; }
        void skipFrequencyComponent2() { bSkipFrequencyComponent2 = true; }
        void skipBGSignalMax() { bSkipBGSignalMax = true; }
        void skipBGSignalRMS() { bSkipBGSignalRMS = true; }
        void skipBGFrequencyComponent1() { bSkipBGFrequencyComponent1 = true; }
        void skipBGFrequencyComponent2() { bSkipBGFrequencyComponent2 = true; }

        bool hasSignalMax() const { return bHasSignalMax; }
        bool hasSignalRMS() const { return bHasSignalRMS; }
        bool hasFrequencyComponent1() const { return bHasFrequencyComponent1; }
        bool hasFrequencyComponent2() const { return bHasFrequencyComponent2; }
        bool hasBGSignalMax() const { return bHasBGSignalMax; }
        bool hasBGSignalRMS() const { return bHasBGSignalRMS; }
        bool hasBGFrequencyComponent1() const { return bHasBGFrequencyComponent1; }
        bool hasBGFrequencyComponent2() const { return bHasBGFrequencyComponent2; }

        AEAmpDataPrivate();
        AEAmpDataPrivate& operator=(const AEAmpDataPrivate& stAEAmpDataPrivate);
        bool operator==(const AEAmpDataPrivate& stAEAmpDataPrivate) const;

    private:
        bool bSignalMax;
        bool bSkipSignalRMS;
        bool bSkipFrequencyComponent1;
        bool bSkipFrequencyComponent2;
        bool bSkipBGSignalMax;
        bool bSkipBGSignalRMS;
        bool bSkipBGFrequencyComponent1;
        bool bSkipBGFrequencyComponent2;

        bool bHasSignalMax;
        bool bHasSignalRMS;
        bool bHasFrequencyComponent1;
        bool bHasFrequencyComponent2;
        bool bHasBGSignalMax;
        bool bHasBGSignalRMS;
        bool bHasBGFrequencyComponent1;
        bool bHasBGFrequencyComponent2;
    };

    struct AEPhaseExtInformationPrivate
    {
        friend class AEPhaseSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucAESensorType;
        qint32 iDataPoint;
        std::vector<quint8 > vecPDTypeProbability;
        float fTriggerThreshold;
        qint16 sOpenTime;
        qint16 sShutTime;
        qint16 sMaxIntervalTime;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipAESensorType() { bSkipAESensorType = true; }
        void skipDataPoint() { bSkipDataPoint = true; }
        void skipPDTypeProbability() { bSkipPDTypeProbability = true; }
        void skipTriggerThreshold() { bSkipTriggerThreshold = true; }
        void skipOpenTime() { bSkipOpenTime = true; }
        void skipShutTime() { bSkipShutTime = true; }
        void skipMaxIntervalTime() { bSkipMaxIntervalTime = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasAESensorType() const { return bHasAESensorType; }
        bool hasDataPoint() const { return bHasDataPoint; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasTriggerThreshold() const { return bHasTriggerThreshold; }
        bool hasOpenTime() const { return bHasOpenTime; }
        bool hasShutTime() const { return bHasShutTime; }
        bool hasMaxIntervalTime() const { return bHasMaxIntervalTime; }
        bool hasGain() const { return bHasGain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }

        AEPhaseExtInformationPrivate();
        void reset();

        AEPhaseExtInformationPrivate& operator=(const AEPhaseExtInformationPrivate& stAEPhaseExtInformationPrivate);
        bool operator==(const AEPhaseExtInformationPrivate& stAEPhaseExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;
        bool bSkipAESensorType;
        bool bSkipDataPoint;
        bool bSkipPDTypeProbability;
        bool bSkipTriggerThreshold;
        bool bSkipOpenTime;
        bool bSkipShutTime;
        bool bSkipMaxIntervalTime;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasAESensorType;
        bool bHasDataPoint;
        bool bHasPDTypeProbability;
        bool bHasTriggerThreshold;
        bool bHasOpenTime;
        bool bHasShutTime;
        bool bHasMaxIntervalTime;
        bool bHasGain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
    };

    struct AEPhaseDataPrivate
    {
        friend class AEPhaseSpectrum;

        QByteArray qbaAEPhaseData;

        void skipAEPhaseSpectrumData() { bSkipAEPhaseSpectrumData = true; }

        bool hasAEPhaseSpectrumData() const { return bHasAEPhaseSpectrumData; }

        AEPhaseDataPrivate();
        AEPhaseDataPrivate& operator=(const AEPhaseDataPrivate& stAEPhaseDataPrivate);
        bool operator==(const AEPhaseDataPrivate& stAEPhaseDataPrivate) const;

    private:
        bool bSkipAEPhaseSpectrumData;

        bool bHasAEPhaseSpectrumData;
    };

    struct AEPulseExtInformationPrivate
    {
        friend class AEPulseSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucAESensorType;
        quint8 ucPulseIntervalTimeUint;
        qint32 iDataPoint;
        std::vector<quint8 > vecPDTypeProbability;
        float fTriggerThreshold;
        qint16 sOpenTime;
        qint16 sShutTime;
        qint16 sMaxIntervalTime;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipAESensorType() { bSkipAESensorType = true; }
        void skipPulseIntervalTimeUint() { bSkipPulseIntervalTimeUint = true; }
        void skipDataPoint() { bSkipDataPoint = true; }
        void skipPDTypeProbability() { bSkipPDTypeProbability = true; }
        void skipTriggerThreshold() { bSkipTriggerThreshold = true; }
        void skipOpenTime() { bSkipOpenTime = true; }
        void skipShutTime() { bSkipShutTime = true; }
        void skipMaxIntervalTime() { bSkipMaxIntervalTime = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasAESensorType() const { return bHasAESensorType; }
        bool hasPulseIntervalTimeUint() const { return bHasPulseIntervalTimeUint; }
        bool hasDataPoint() const { return bHasDataPoint; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasTriggerThreshold() const { return bHasTriggerThreshold; }
        bool hasOpenTime() const { return bHasOpenTime; }
        bool hasShutTime() const { return bHasShutTime; }
        bool hasMaxIntervalTime() const { return bHasMaxIntervalTime; }
        bool hasGain() const { return bHasGain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }

        AEPulseExtInformationPrivate();
        void reset();

        AEPulseExtInformationPrivate& operator=(const AEPulseExtInformationPrivate& stAEPulseExtInformationPrivate);
        bool operator==(const AEPulseExtInformationPrivate& stAEPulseExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;
        bool bSkipAESensorType;
        bool bSkipPulseIntervalTimeUint;
        bool bSkipDataPoint;
        bool bSkipPDTypeProbability;
        bool bSkipTriggerThreshold;
        bool bSkipOpenTime;
        bool bSkipShutTime;
        bool bSkipMaxIntervalTime;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasAESensorType;
        bool bHasPulseIntervalTimeUint;
        bool bHasDataPoint;
        bool bHasPDTypeProbability;
        bool bHasTriggerThreshold;
        bool bHasOpenTime;
        bool bHasShutTime;
        bool bHasMaxIntervalTime;
        bool bHasGain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
    };

    struct AEPulseDataPrivate
    {
        friend class AEPulseSpectrum;

        QByteArray qbaAEPulseData;

        void skipAEPulseSpectrumData() { bSkipAEPulseSpectrumData = true; }

        bool hasAEPulseSpectrumData() const { return bHasAEPulseSpectrumData; }

        AEPulseDataPrivate();
        AEPulseDataPrivate& operator=(const AEPulseDataPrivate& stAEPulseDataPrivate);
        bool operator==(const AEPulseDataPrivate& stAEPulseDataPrivate) const;

    private:
        bool bSkipAEPulseSpectrumData;

        bool bHasAEPulseSpectrumData;
    };

    struct AEWaveExtInformationPrivate
    {
        friend class AEWaveSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucAESensorType;
        qint32 iDataPoint;
        qint64 llSampleRate;
        std::vector<quint8 > vecPDTypeProbability;
        float fTriggerThreshold;
        qint16 sOpenTime;
        qint16 sShutTime;
        qint16 sMaxIntervalTime;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipAESensorType() { bSkipAESensorType = true; }
        void skipDataPoint() { bSkipDataPoint = true; }
        void skipSampleRate() { bSkipSampleRate = true; }
        void skipPDTypeProbability() { bSkipPDTypeProbability = true; }
        void skipTriggerThreshold() { bSkipTriggerThreshold = true; }
        void skipOpenTime() { bSkipOpenTime = true; }
        void skipShutTime() { bSkipShutTime = true; }
        void skipMaxIntervalTime() { bSkipMaxIntervalTime = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasAESensorType() const { return bHasAESensorType; }
        bool hasDataPoint() const { return bHasDataPoint; }
        bool hasSampleRate() const { return bHasSampleRate; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasTriggerThreshold() const { return bHasTriggerThreshold; }
        bool hasOpenTime() const { return bHasOpenTime; }
        bool hasShutTime() const { return bHasShutTime; }
        bool hasMaxIntervalTime() const { return bHasMaxIntervalTime; }
        bool hasGain() const { return bHasGain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }

        AEWaveExtInformationPrivate();
        void reset();

        AEWaveExtInformationPrivate& operator=(const AEWaveExtInformationPrivate& stAEWaveExtInformationPrivate);
        bool operator==(const AEWaveExtInformationPrivate& stAEWaveExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;
        bool bSkipAESensorType;
        bool bSkipDataPoint;
        bool bSkipSampleRate;
        bool bSkipPDTypeProbability;
        bool bSkipTriggerThreshold;
        bool bSkipOpenTime;
        bool bSkipShutTime;
        bool bSkipMaxIntervalTime;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasAESensorType;
        bool bHasDataPoint;
        bool bHasSampleRate;
        bool bHasPDTypeProbability;
        bool bHasTriggerThreshold;
        bool bHasOpenTime;
        bool bHasShutTime;
        bool bHasMaxIntervalTime;
        bool bHasGain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
    };

    struct AEWaveDataPrivate
    {
        friend class AEWaveSpectrum;

        QByteArray qbaAEWaveData;

        void skipAEWaveSpectrumData() { bSkipAEWaveSpectrumData = true; }

        bool hasAEWaveSpectrumData() const { return bHasAEWaveSpectrumData; }

        AEWaveDataPrivate();
        AEWaveDataPrivate& operator=(const AEWaveDataPrivate& stAEWaveDataPrivate);
        bool operator==(const AEWaveDataPrivate& stAEWaveDataPrivate) const;

    private:
        bool bSkipAEWaveSpectrumData;

        bool bHasAEWaveSpectrumData;
    };
}
